<!DOCTYPE html>
<html>
	<body>
		<script src="./js/lodash-4.17.21.js"></script>
		<script type="module">
			import mapData from "./js/map.js"
			let data = _.cloneDeep(mapData.resultMap.list)
			const province = '广东省'
			const city = '广州市'
			const cityData = data.filter(item => item.name === province);
			// cityData.forEach((item, index) => {
			// 	item.newCitys = [];
			// 	item.citys.forEach((item2, index2) => {
			// 		if (item2.name === city) {
			// 			item.newCitys.push(item2)
			// 			item.citys = item.newCitys
			// 			delete item.newCitys
			// 		}
			// 	})
			// })
			cityData.forEach((item, index) => {
				item.citys = item.citys.filter(item2 => item2.name === city)
			})
			console.log(cityData, 'cityData')
		</script>
	</body>
</html>